package com.example.demo.tools;

import com.example.demo.pojo.BookNameBean;

import java.util.Comparator;

/**
 * @Classname BookNameSort
 * @Description TODO
 * @Date 2020/12/29 16:38
 * @Created by 新
 */
//图书名称排序
public class BookNameSort implements Comparator<BookNameBean> {
    @Override
    public int compare(BookNameBean o1, BookNameBean o2) {
        //按照图书名称升序排列
        return o1.getBookName().compareTo(o2.getBookName());
    }
}
